<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
    <style>
        h1 {
            width: 200px;
            height: 200px;
            border: 1px solid red;
        }

        .demo {
            background-color: gray;
        }

        .demo1 {
            border-radius: 50px;
        }

        .demo2 {
            background-color: yellow;
        }

        .demo3 {
            font-size: 24px;
        }
    </style>
</head>
<body>
<div id="root">
    <h1 class="demo" :style="styleArr">hello world</h1>
</div>
<script>
    Vue.config.productionTip = false;
    new Vue({
        el: "#root",
        data: {
            styleArr: [
                {
                    fontSize: "20px",
                    backgroundColor: "red"
                },
                {
                    borderRadius: "20px"
                }
            ]
        },
        methods: {
            fn() {
                this.demo1 = "demo2"
            }
        }
    })
</script>
</body>
</html>
